0ef96aaf9e6714db1bd21e2d86209029d23ecfa1,src/main/java/com/shapesecurity/salvation/Parser.java,Parser,parsePolicyAndAssertEOF,#,135

Before Change


    @Nonnull protected Policy parsePolicyAndAssertEOF() throws ParseException {
        Policy policy = this.parsePolicy();
        if (this.hasNext()) {
            throw this.createError("expecting end of policy but found " + this.advance().value);
        }
        return policy;
    }

After Change


    @Nonnull protected Policy parsePolicyAndAssertEOF() {
        Policy policy = this.parsePolicy();
        if (this.hasNext()) {
            this.error("Expecting end of policy but found " + this.advance().value);
        }
        return policy;
    }